import { createRouter, createWebHistory } from 'vue-router';
import HomeView from '../views/HomeView.vue';

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
  },
  {
    path: '/ref',
    name: 'ref',
    component: () => import(/* webpackChunkName: "ref" */ '../views/Ref.vue'),
  },
  {
    path: '/reactive',
    name: 'reactive',
    component: () =>
      import(/* webpackChunkName: "reactive" */ '../views/Reactive.vue'),
  },
  {
    path: '/toRefs',
    name: 'toRefs',
    component: () =>
      import(/* webpackChunkName: "toRefs" */ '../views/ToRefs.vue'),
  },
  {
    path: '/computed',
    name: 'computed',
    component: () =>
      import(/* webpackChunkName: "computed" */ '../views/Computed.vue'),
  },
  {
    path: '/watch',
    name: 'watch',
    component: () =>
      import(/* webpackChunkName: "watch" */ '../views/Watch.vue'),
  },
  {
    path: '/setup',
    name: 'setup',
    component: () =>
      import(/* webpackChunkName: "setup" */ '../views/Setup.vue'),
  },
  {
    path: '/provide',
    name: 'provide',
    component: () =>
      import(/* webpackChunkName: "provide" */ '../views/Provide.vue'),
  },
  {
    path: '/suspense',
    name: 'suspense',
    component: () =>
      import(/* webpackChunkName: "suspense" */ '../views/Suspense.vue'),
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
